function [ dir, pv ] = evaluatePrincipalInfo( stress, domain2D )
%EVALUATEPRINCIPALINFO' Summary of this function goes here
%   Detailed explanation goes here

n = size(stress, 3);

dir = zeros(n, 2);
pv = zeros(n, 1);

for i = 1 : n
    [V, D] = eig(stress(:,:,i));
    [mv, index] = max(diag(D));
    pv(i) = max(mv, 0);
    
    vnorm = [domain2D.vnx; domain2D.vny];
    
    dir(i, :) = getCrackDir(V(:, index), vnorm)';
end

end

